<!doctype html>

<html>

<head>

	<meta charset="utf-8">

	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

	<title>我的优惠券</title>
	<link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/css/base.css">
	<link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/mobile/css/master.css">
	<script>
	var _hmt = _hmt || [];

	(function() {

	  var hm = document.createElement("script");

	  hm.src = "//hm.baidu.com/hm.js?11ad56ca0738ac14d150a362fca3e058";

	  var s = document.getElementsByTagName("script")[0]; 

	  s.parentNode.insertBefore(hm, s);

	})();

	</script>
</head>
	<body style="background:#f5f5f5">

		<header>

			<a href="tel:4006730088" class="tel iconfont">&#xe60c;</a>

			<a href="javascript:void(0)" class="menu iconfont" onclick="home.showMenu()">&#xe602;</a>

			<img src="{:C('WEB_URL')}Public/mobile/images/logo.png" id="logo">

		</header>
		<div class="myCoupon">
			<empty name="couponList">
				<div class="empty">
					<i>&#xe619;</i>
					<p>您当前暂无优惠券</p>
				</div>

				<else />
				<ul>
					<?php foreach($couponList as $list){ ?>

					<li class="<?php if($list['status'] == 0||$list['end_time']<time()){echo 'gray';} ?>">

						<p class="status"><?php if($list['end_time']<time()){echo '已过期';}elseif($list['status'] == 0){echo '已使用';}elseif($list['status'] == 1){echo '可使用';}elseif($list['status'] == 2){echo '下单后激活';} ?></p>

						<p class="price"><?php if($list['type'] == 1){echo '￥'.$list['money'];}elseif($list['type'] == 2){echo $list['money'].'折';}elseif($list['type'] == 4 && $list['status'] == 1){ echo '￥'.$list['rand_money'];}elseif($list['type'] == 4 && $list['status'] == 2){ echo '<span style="font-size:16px;color:#27AE60;">买多少送多少</span>';} ?></p>

						<p class="name">{$list['content']}</p>
						
						<p class="time">
							<?php if($list['c_id']==4){echo date('Y-m-d',$list['end_time']).' 过期';}elseif($list['end_time']<time()){echo '已过期';}else{echo date('Y-m-d',$list['end_time']).' 过期';} ?>
							<span style="font-size:12px;padding-left:20px;">优惠码:{$list['code']}</span>
						</p>

						<eq name="list['status']" value="0"><p class="used"></p></eq>

					</li>

					<?php } ?>

				</ul>

			</empty>
		</div>
		<include file="Public/mobileHome" />
	</body>
</html>